<!DOCTYPE html>
<html lang="zh" >
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo e($article->title); ?></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link href="/mycms/cms/theme/My/assets/css/activity.css" rel="stylesheet">
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
</head>
<body class="bg-[#EAEFFF] font-['PingFang']" >
    <div class="container mx-auto h-auto bg-white  leading-10 mb-9" style="" >
         <article class="prose lg:prose-xl">
                   <?php echo $article->content; ?>

        </article>
        
    </div>
    <div class="container h-20   bg-white content-center fixed left-0 right-0 bottom-0  flex flex-col justify-center items-center shadow-inner">
        <?php if($islogin): ?>
            <?php if($iscomment): ?>
            <a href="<?php echo e(route('user.task',['aid'=>$article->id])); ?>" class="bg-[#3368FD]  rounded-full shadow-xl shadow-blue-400/30 w-7/12 h-12  text-white font-bold text-xl  pt-2"><center>领取任务</center></a>
           <?php else: ?>
                <?php if($isinfo): ?>
               <button onclick="comment()" class="bg-[#3368FD]  rounded-full shadow-xl shadow-blue-400/30 w-7/12 h-12  text-white font-bold text-xl">立即报名</a>
               <?php else: ?>
                  <a href="<?php echo e(route('user.info')); ?>" class="bg-[#3368FD]  rounded-full shadow-xl shadow-blue-400/30 w-7/12 h-12  text-white font-bold text-xl  pt-2"><center>立即报名</center></a>
               <?php endif; ?>
           <?php endif; ?>
        <?php else: ?>
          <a href="<?php echo e(route('user.reg')); ?>"  class="bg-[#3368FD]  rounded-full shadow-xl shadow-blue-400/30 w-7/12 h-12  text-white font-bold text-xl pt-2"><center>立即报名</center></a>
        <?php endif; ?>
     
    </div>
<script>
    function comment(obj)
    {
        $.ajax({
            url: '<?php echo e(route('a.comment')); ?>',
            type: 'post',
            contentType: "application/x-www-form-urlencoded; charset=UTF-8",
            dataType: "json",
            data: {"id":<?php echo e($id); ?>,'tuid':<?php echo e($tuid); ?> },
            timeout: 60000,
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            },
            success: function (res) {
               alert(res.msg);
               location.href = '<?php echo e(single_path($id)); ?>';  
                
            },
            error: function (xhr) {
              jsonObj=JSON.parse(xhr.response)
              alert(jsonObj.msg);
              return false;
            }
        });
        return false;
    }
</script>
<?php echo $__env->make("template::My.views._footer", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php /**PATH /www/wwwroot/mycms/Template/My/views/single.blade.php ENDPATH**/ ?>